contractItemColumns: [
  {
    title: '项目名称',
    key: 'itemName',
    align: 'center',
    width: 120,
    render: (h, params) => {
      const select = this.itemList.map(item => item.itemName)
      const arr = []
      select.forEach(item => {
        arr.push(
          h('Option', {
            attrs: {
              value: item
            },
          }, item)
        )
      })
      return h('Select', {
        domProps: {
          value: params.row.itemName
        },
        on: {
          input: async (e) => {

            /*
             TODO: 可以通过用户选中的项目名进行查找对应的项目所在 this.itemList 中的哪一个
                    拿到 项目后对 params.row 进行赋值
                  将 Input 改成原生 input

                  表格中 可以通过 params.row._index 拿到当前行 index 可以将当前行与指定 变量进行赋值 保持一致
                  最后进行添加请求
            */
            params.row.itemName = e
            const item = this.itemList.find(item => item.itemName == e)

            // 下面的赋值复杂是由于 contractItem 的返回值不是普通对象 需要对其进行转换
            const info = new contractItem()
            info.baseInfo = info.getEditVal(item, info.baseInfo)
            info.baseInfo.itemCostPrice.itemCostPrice = item.itemPrice
            info.baseInfo.itemPrice.itemPrice = item.salePrice
            const jieguo = await info.getJieKouParams(
              info.baseInfo
            )
            // params.row= jieguo
            //必须要进行单独赋值
            for (let i of Object.keys(jieguo)) {
              params.row[i] = jieguo[i]
            }
            //使 contractItemData 与 table 内容保持一致
            this.contractItemData[params.row._index] = params.row
            console.log(this.contractItemData);
            this.$forceUpdate()
          },

        }
      }, arr)
    },
  },
  {
    title: '项目数量',
    key: 'itemNumber',
    align: 'center',
    width: 120,
    render: (h, params) => {
      console.log(params);
      return h('input', {
        style: {
          width: '80px',
        },
        domProps: {
          value: params.row.itemNumber
        },
        on: {
          input: (e) => {
            console.log(e);
            params.row.itemNumber = e.target.value
            this.contractItemData[params.row._index] = params.row
          }
        }
      })
    },
  },
  {
    title: '项目单价',
    key: 'itemPrice',
    align: 'center',
    width: 120,
    render: (h, params) => {
      console.log(params);
      return h('input', {
        style: {
          width: '80px',
        },
        domProps: {
          value: params.row.itemPrice
        },
        on: {
          input: (e) => {
            console.log(e);
            params.row.itemPrice = e.target.value
            this.contractItemData[params.row._index] = params.row

          }
        }
      })
    },
  },
  {
    title: '项目成本价格',
    key: 'itemCostFee',
    align: 'center',
    width: 120,
    render: (h, params) => {
      console.log(params);
      return h('input', {
        style: {
          width: '80px',
        },
        domProps: {
          value: params.row.itemCostFee
        },
        on: {
          input: (e) => {
            console.log(e);
            params.row.itemCostFee = e.target.value
            this.contractItemData[params.row._index] = params.row

          }
        }
      })
    },
  },
  {
    title: '项目成本单价',
    key: 'itemCostPrice',
    align: 'center',
    width: 120,
    render: (h, params) => {
      console.log(params);
      return h('input', {
        style: {
          width: '80px',
        },
        domProps: {
          value: params.row.itemCostPrice
        },
        on: {
          input: (e) => {
            console.log(e);
            params.row.itemCostPrice = e.target.value
            this.contractItemData[params.row._index] = params.row

          }
        }
      })
    },
  },
  {
    title: '已支付',
    key: 'paidFee',
    align: 'center',
    width: 120,
    render: (h, params) => {
      console.log(params);
      return h('input', {
        style: {
          width: '80px',
        },
        domProps: {
          value: params.row.paidFee
        },
        on: {
          input: (e) => {
            console.log(e);
            params.row.paidFee = e.target.value
            this.contractItemData[params.row._index] = params.row

          }
        }
      })
    },
  },
  {
    title: '快递单号',
    key: 'postNo',
    align: 'center',
    width: 120,
    render: (h, params) => {
      console.log(params);
      return h('input', {
        style: {
          width: '80px',
        },
        domProps: {
          value: params.row.postNo
        },
        on: {
          input: (e) => {
            console.log(e);
            params.row.postNo = e.target.value
            this.contractItemData[params.row._index] = params.row

          }
        }
      })
    },
  },
  {
    title: '发货时间',
    key: 'postedTime',
    align: 'center',
    width: 120,
    render: (h, params) => {
      console.log(params);
      return h('Date-picker', {
        style: {
          width: '80px',
        },
        domProps: {
          value: params.row.postedTime
        },
        on: {
          input: (e) => {
            console.log(e);
            params.row.postedTime = e.target.value
            this.contractItemData[params.row._index] = params.row

          }
        }
      })
    },
  },
  {
    title: '发货状态',
    key: 'stat',
    align: 'center',
    width: 120,
    render: (h, params) => {
      const select = ['待发货', '已发货']
      const arr = []
      select.forEach(item => {
        arr.push(
          h('Option', {
            attrs: {
              value: item
            }
          }, item)
        )
      })
      return h('Select', {
        domProps: {
          value: params.row.itemName
        },
        on: {
          input: (e) => {
            console.log(e);
            params.row.stat = e
            this.contractItemData[params.row._index] = params.row
          }
        }
      }, arr)
    },
  },
  {
    title: '项目费用',
    key: 'itemFee',
    align: 'center',
    width: 120,
    render: (h, params) => {
      console.log(params);
      return h('input', {
        style: {
          width: '80px',
        },
        domProps: {
          value: params.row.itemFee
        },
        on: {
          input: (e) => {
            console.log(e);
            params.row.itemFee = e.target.value
            this.contractItemData[params.row._index] = params.row

          }
        }
      })
    },
  },
  {
    title: '备注',
    key: 'remark',
    align: 'center',
    width: 120,
    render: (h, params) => {
      console.log(params);
      return h('input', {
        style: {
          width: '80px',
        },
        domProps: {
          value: params.row.remark
        },
        on: {
          input: (e) => {
            console.log(e);
            params.row.remark = e.target.value
            this.contractItemData[params.row._index] = params.row
          }
        }
      })
    },
  },
],